<?php
	
	header('Content-type:text/html;charset=utf-8');
	
	$id = isset($_GET['id']) ? (integer)$_GET['id'] : 0;
	if($id == 0){
		header('Refresh:3;url=news.php');
		echo '当前要编辑的新闻不存在';
		exit;
	}
	
	include_once 'mysql.php';
	$sql = "select * from news where id = {$id}";
	$res = my_error($sql);
	$new = mysql_fetch_assoc($res);
	
	include_once 'edit.html';
?>